//
//  YFDemoViewController.swift
//  YFSwiftWeibo
//
//  Created by tsaievan on 2017/8/24.
//  Copyright © 2017年 tsaievan. All rights reserved.
//

import UIKit

class YFDemoViewController: YFBaseViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }

    // MARK: - 监听方法
    @objc fileprivate func showNext() {
        let vc = YFDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension YFDemoViewController {
    override func setupTableView() {
        super.setupTableView()
        _navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
}
